#!/usr/bin/python

import os

SCOUR_EXE = "./scour.py/scour.py"

def getCmd(inputFile, inputDirectory, outputDirectory):
  cmd = """%s -i %s/%s -o %s/%s --shorten-ids --strip-xml-prolog --create-groups --enable-id-stripping --remove-metadata --enable-comment-stripping --indent=none --set-precision=4""" % (SCOUR_EXE, inputDirectory, inputFile, outputDirectory, inputFile)
  return cmd

for filename in os.listdir("./svgbg_originals"):
  cmd = getCmd(filename, "./svgbg_originals", 'svgbg')
  print cmd
  os.popen(cmd)

